﻿using System;
using System.IO;
using Grimgine.Core;

namespace Grimgine.Util
{
    /// <summary>
    /// 
    /// </summary>
    public class Logger : Singleton<Logger>
    {
        private StreamWriter log;
        private const string logFilePath = "log.txt";

        /// <summary>
        /// 
        /// </summary>
        protected Logger()
        {
            log = new StreamWriter(logFilePath);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="args"></param>
        public void Log(String message, params object[] args)
        {
            string msg = String.Format(message, args);
            log.WriteLine(msg);
        }
    }
}
